function get_time(){
	$.ajax({
		url:"/time",
		timeout:10000,
		success:function(data){
			$("#time").html(data)
		},
		error:function(xhr,type,errorThrown){
					
		}
	});
				
}
			
function get_c1_data(){
	$.ajax({
		url:"/c1",
		timeout:10000,
		success:function(data){
			$(".num h2").eq(0).text(data.Speed)
			$(".num h2").eq(1).text(data.Price)
			$(".num h2").eq(2).text(data.Order)
			$(".num h2").eq(3).text(data.Rec)
		},
		error:function(xhr,type,errorThrown){

	}
	});
}

function get_c2_data(){
	$.ajax({
		url:"/c2",
		timeout:10000,
		success:function(data){
			ec_center_option.series[0].data=data.data
			ec_center.setOption(ec_center_option)
			
		},
		error:function(xhr,type,errorThrown){

	}
	});
}

function get_l2_data(){
	$.ajax({
		url:"/l2",
		timeout:10000,
		success:function(data){
			ec_left2_option.yAxis.data=data.type_list
			ec_left2_option.series[0].data=data.value_list
			ec_left2.setOption(ec_left2_option)
		},
		error:function(xhr,type,errorThrown){

	}
	});
}

function get_l1_data(){
	$.ajax({
		url:"/l1",
		timeout:10000,
		success:function(data){
			ec_left1_option.xAxis.data=data.type_list
			// ec_left1_option.data[0]=data.data1
			// ec_left1_option.data[1]=data.data2
			// ec_left1_option.data[2]=data.data3
			ec_left1_option.series[0].data=data.value_list
			ec_left1.setOption(ec_left1_option)
		},
		error:function(xhr,type,errorThrown){

	}
	});
}

function get_r2_data(){
	$.ajax({
		url:"/r2",
		timeout:10000,
		success:function(data){
			ec_right2_option.xAxis.data=data.type_list
			ec_right2_option.series[0].data=data.value_list
			ec_right2.setOption(ec_right2_option)
		},
		error:function(xhr,type,errorThrown){

	}
	});
}

function get_r1_data(){
	$.ajax({
		url:"/r1",
		timeout:10000,
		success:function(data){
			ec_right1_option.xAxis.data=data.type_list
			ec_right1_option.series[0].data=data.value_list
			ec_right1.setOption(ec_right1_option)
		},
		error:function(xhr,type,errorThrown){

	}
	});
}

// get_time()
// get_c1_data()
// setInterval(get_time,1000)
// setInterval(get_c1_data,2000)